package org.thread.test05.demo04;

/**
 * @author ZJL
 * @date 2025-03-12
 */
public class MyThread extends Thread {
    private Printer printer;
    private String  user;
    private  String msg;

    public MyThread(Printer printer, String user, String msg) {
        this.printer = printer;
        this.user = user;
        this.msg = msg;
    }

    @Override
    public void run() {
        printer.print(user,msg);
    }


}
